package com.crawler.waf.config;


import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Import;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.servlet.configuration.EnableWebMvcSecurity;

import com.crawler.waf.security.WafSecurityConfig;


/**
 * 基于spring security的安全配置类。本类定义为抽象类。器主要目的提供给开发者进行安全路径的过滤设置。<br>
 * 1、定制默认过滤器数量为5个<br>
 * 2、定义认证提供器，并且设置需要的UserDetailsService和TokenService<br>
 * 3、定义自定义的认证的核心过滤器  {@see TokenAuthenticationProcessFilter}<br>
 *
 */
@EnableWebMvcSecurity
@Import(WafSecurityConfig.class)
@ComponentScan(basePackages = "com.crawler.waf.security.*")
public class WebSecurityConfigurerAdapter extends ApiSecurityConfig {

    protected WebSecurityConfigurerAdapter() {
        super();
    }

    /**
     * 扩展spring security的授权路径配置
     *
     * @param http
     * @throws Exception
     */
    protected void onConfigure(HttpSecurity http) throws Exception {
    }
}
